<!doctype html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <title>登录 | TEFS</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <style>
    :root {
      --primary-color: #3498db;
      --secondary-color: #2980b9;
      --text-color: #2c3e50;
      --light-text: rgba(255, 255, 255, 0.9);
      --bg-overlay: rgba(0, 0, 0, 0.5);
    }

    body {
      margin: 0;
      padding: 0;
      min-height: 100vh;
      position: relative;
      overflow-x: hidden;
      font-family: 'Segoe UI', system-ui, sans-serif;
    }

    /* 顶部欢迎文字样式优化 */
    .welcome-section {
      text-align: center;
      padding: 2rem 1rem 1rem;
      position: relative;
      z-index: 1;
    }

    .welcome-text {
      color: var(--light-text);
      font-size: clamp(1.5rem, 3vw, 2.2rem);
      font-weight: 600;
      margin: 0;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      animation: fadeIn 1s ease-in-out;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    body::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url("/static/images/123.JPG");
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      background-attachment: fixed;
      filter: brightness(0.4);
      z-index: -1;
    }

    /* 系统名称位置调整 */
    .system-name {
      position: absolute;
      top: 20px;
      right: 30px;
      font-size: 1rem;
      color: rgba(255, 255, 255, 0.8);
      z-index: 1;
      padding: 0.5rem 1rem;
      background-color: rgba(0, 0, 0, 0.2);
      border-radius: 6px;
    }

    /* 主容器调整 */
    .container {
      padding: 1rem;
    }

    .login-container {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: calc(100vh - 120px);
    }

    .card-container {
      display: flex;
      width: 100%;
      max-width: 900px;
      background-color: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(12px);
      border: none;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.3s ease;
      position: relative;
      z-index: 1;
    }

    .card-container:hover {
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
      transform: translateY(-5px);
    }

    /* 左侧图片区域调整 */
    .card-img-wrap {
      width: 35%;
      position: relative;
      overflow: hidden;
      min-height: 450px;
    }

    .card-img-wrap::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.2);
      z-index: 1;
    }

    .card-img-inner {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url('/static/images/R-C.jpg');
      background-size: cover;
      background-position: center;
      transition: transform 0.7s ease;
    }

    .card-img-wrap:hover .card-img-inner {
      transform: scale(1.08);
    }

    /* 图片区域文字叠加 */
    .img-overlay-text {
      position: absolute;
      bottom: 30px;
      left: 0;
      right: 0;
      text-align: center;
      z-index: 2;
      color: white;
      padding: 0 1rem;
    }

    .img-overlay-text h3 {
      font-size: 1.4rem;
      margin-bottom: 0.5rem;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .img-overlay-text p {
      font-size: 0.9rem;
      opacity: 0.9;
    }

    /* 右侧表单区域调整 */
    .card-content {
      width: 65%;
      padding: 2.5rem;
      display: flex;
      flex-direction: column;
    }

    .card-title {
      color: var(--light-text);
      font-weight: 600;
      margin-bottom: 2rem !important;
      position: relative;
      padding-bottom: 0.8rem;
      text-align: center;
      font-size: 1.8rem;
    }

    .card-title::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 60px;
      height: 3px;
      background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
      border-radius: 3px;
    }

    .form-group {
      margin-bottom: 1.5rem !important;
    }

    .form-label {
      color: var(--light-text);
      font-weight: 500;
      margin-bottom: 0.5rem;
      display: block;
    }

    .form-control {
      border: 1px solid rgba(255, 255, 255, 0.3);
      border-radius: 8px;
      padding: 0.85rem 1rem;
      transition: all 0.3s ease;
      background-color: rgba(255, 255, 255, 0.15);
      color: var(--light-text);
    }

    .form-control::placeholder {
      color: rgba(255, 255, 255, 0.6);
    }

    .form-control:focus {
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
      outline: none;
      background-color: rgba(255, 255, 255, 0.2);
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
      border: none;
      border-radius: 8px;
      padding: 0.85rem;
      font-weight: 500;
      color: white;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
      margin-top: 0.5rem;
    }

    .btn-primary::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;
      transform: translate(-50%, -50%);
      transition: width 0.6s ease, height 0.6s ease;
    }

    .btn-primary:hover::after {
      width: 300px;
      height: 300px;
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }

    .btn-primary:active {
      transform: translateY(0);
    }

    .link-section {
      margin-top: 2rem !important;
      text-align: center;
    }

    .link-section a {
      color: var(--primary-color);
      transition: all 0.3s ease;
      font-weight: 500;
      text-decoration: none;
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
    }

    .link-section a:hover {
      color: #fff;
      background-color: rgba(52, 152, 219, 0.2);
      text-decoration: none;
    }

    .alert-danger {
      background-color: rgba(231, 76, 60, 0.15);
      border: 1px solid rgba(231, 76, 60, 0.3);
      color: #ffcdd2;
      border-radius: 8px;
      padding: 0.75rem;
      margin-bottom: 1.5rem;
      text-align: center;
    }

    /* 响应式调整优化 */
    @media (max-width: 992px) {
      .card-container {
        max-width: 750px;
      }
    }

    @media (max-width: 768px) {
      .card-container {
        flex-direction: column;
        max-width: 500px;
      }

      .card-img-wrap {
        width: 100%;
        min-height: 220px;
      }

      .card-content {
        width: 100%;
        padding: 2rem 1.8rem;
      }

      .system-name {
        position: static;
        text-align: center;
        margin-bottom: 1rem;
        display: inline-block;
      }

      .welcome-section {
        padding: 1.5rem 1rem 0.5rem;
      }
    }

    @media (max-width: 576px) {
      .card-content {
        padding: 1.5rem 1.2rem;
      }

      .card-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem !important;
      }

      .form-group {
        margin-bottom: 1.2rem !important;
      }
    }
  </style>
</head>

<body>
  <!-- 顶部欢迎区域 -->
  <div class="welcome-section">
    <p class="welcome-text">欢迎使用 TEFS 教学视频语音提取系统</p>
    <div class="system-name">TEFS - 教学视频语音提取系统</div>
  </div>

  <!-- 登录容器 -->
  <div class="login-container">
    <div class="card-container shadow">
      <div class="card-img-wrap">
        <div class="card-img-inner"></div>
        <div class="img-overlay-text">
          <h3>智能语音提取</h3>
          <p>高效处理教学视频内容</p>
        </div>
      </div>
      <div class="card-content">
        <h4 class="card-title">账户登录</h4>

        {% with msgs = get_flashed_messages() %}
          {% if msgs %}
            <div class="alert alert-danger">{{ msgs[0] }}</div>
          {% endif %}
        {% endwith %}

        <form method="post">
          <div class="form-group">
            <label class="form-label">
              <i class="fas fa-user me-2"></i>用户名
            </label>
            <input class="form-control" name="username" placeholder="请输入用户名" required>
          </div>
          <div class="form-group">
            <label class="form-label">
              <i class="fas fa-lock me-2"></i>密码
            </label>
            <input type="password" class="form-control" name="password" placeholder="请输入密码" required>
          </div>
          <button type="submit" class="btn btn-primary w-100">
            <i class="fas fa-sign-in-alt me-2"></i>登录
          </button>
        </form>
        <div class="link-section">
          <a href="{{ url_for('register') }}">
            <i class="fas fa-user-plus me-1"></i>注册新账号
          </a>
        </div>
      </div>
    </div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>

</html>